package com.twu.biblioteca.model;

import sun.security.x509.X509CertInfo;

/**
 * Created by sgreweni on 29.07.14.
 */
public abstract class LibraryItem {
    private final String title;

    protected LibraryItem(String title) {
        this.title = title;
    }

    public String getTitle() {
        return title;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof LibraryItem)) return false;

        LibraryItem that = (LibraryItem) o;

        if (title != null ? !title.equals(that.title) : that.title != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        return title != null ? title.hashCode() : 0;
    }
}
